import com.amazon.trietree.db.PostgreUtils;
import org.junit.Test;

import static org.hamcrest.core.Is.is;
import static org.hamcrest.core.IsNot.not;
import static org.junit.Assert.assertThat;

/**
 * Created with IntelliJ IDEA.
 * User: Tylaar
 * Date: 11/8/12
 * Time: 4:42 PM
 * Company: Amazon.com
 */

public class TestPostgreConnection {
    @Test
    public void testConnection(){
        PostgreUtils utils = new PostgreUtils();
        utils.setDbLocation("jdbc:postgresql://162.105.146.28/yyfdb");
        utils.setPassword("1988219");
        utils.setUsername("yyf");
        long result = utils.getNextVal();
        assertThat(result, is(not(-1l)));
    }


}
